<%--
  Created by IntelliJ IDEA.
  User: 南苼
  Date: 2021/7/4
  Time: 10:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script type="text/javascript" src="../js/jquery-1.10.2.js" ></script>
    <link rel='stylesheet' href='../css/settingsks.css'>
    <script>
        $(function(){
            var sele=$("select");
            !function(){
                $(sele[0]).append("<option value='400'>400分");
                $(sele[0]).append("<option value='300'>300分");
                $(sele[0]).append("<option value='200'>200分");
                for(var i=15;i>=1;i--){
                    $(sele[0]).append("<option value='"+i+"0'>"+i+"0分");
                }
            }();
            $("#qx").click(function(){
                $("input").val(" ");
                $(".m3").val(" ");
            });
            $("#bc").click(function(){
                $.ajax({
                    url:"http://localhost:9090/Eventstar/set/add",
                    data:{"ksname":$("#ksname").val(),"kskdate":$("#kskdate").val(),
                        "ksjdate":$("#ksjdate").val(),"ksdate":$("#ksdate").val(),
                        "kszf":$("#kszf").val(),"kstxt":$("#kstxt").val()},
                    success:function(){
                        window.location.href ="settings.jsp?URL=settings_zw/edit.jsp&name="+$(".m1").val()+"&fra="+$("#kszf").val();
                    }
                });
            })
        })
    </script>
</head>
<body>
<div class="kd1">
    <div class="kd2">
        <img src="/Eventstar/img/examimg/xk3.PNG">
        <img src="/Eventstar/img/examimg/xk1.PNG">
    </div>
    <div class="kd4">
        <div class="to"><h4>基本考试信息</h4></div>
        <hr/>
        <div class="mast">
            <div>考试名称: <input type="text" class="m1" id="ksname" placeholder="请输入考试名称"/></div>
            <div>开始时间: <input type="date" class="m2" id="kskdate" /> 结束时间: <input type="date" class="m2" id="ksjdate"/></div>
            <div>考试总分: <select class="m2" id="kszf"></select></div>
            <div>答题时限: <select class="m2" id="ksdate">
                <option value="1">1分钟</option>
                <option value="2">2分钟</option>
                <option value="5">5分钟</option>
                <option value="10">10分钟</option>
                <option value="15">15分钟</option>
                <option value="20">20分钟</option>
                <option value="30">30分钟</option>
                <option value="45">45分钟</option>
                <option value="60" selected>1小时</option>
                <option value="90">1.5小时</option>
                <option value="120">2小时</option>
                <option value="150">2.5小时</option>
                <option value="1440">24小时</option>
            </select></div>
            <div>考试介绍: <br/><textarea class="m3" placeholder="请介绍一下你的考试" id="kstxt"></textarea></div>
            <div>
                <div id="bc"><a href="#">保 存</a></div>
                <div id="qx">取消</div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
